<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">Inv detalle Details</f:facet>

        <s:decorate id="detCodItem" template="layout/display.xhtml">
            <ui:define name="label">Det cod item</ui:define>
            <h:outputText value="#{invDetalleHome.instance.detCodItem}"/>
        </s:decorate>

        <s:decorate id="depCodigo" template="layout/display.xhtml">
            <ui:define name="label">Dep codigo</ui:define>
            <h:outputText value="#{invDetalleHome.instance.depCodigo}"/>
        </s:decorate>

        <s:decorate id="detCodGrupo" template="layout/display.xhtml">
            <ui:define name="label">Det cod grupo</ui:define>
            <h:outputText value="#{invDetalleHome.instance.detCodGrupo}"/>
        </s:decorate>

        <s:decorate id="detCosto" template="layout/display.xhtml">
            <ui:define name="label">Det costo</ui:define>
            <h:outputText value="#{invDetalleHome.instance.detCosto}">
                <f:convertNumber/>
            </h:outputText>
        </s:decorate>

        <s:decorate id="detPrecioConfirm" template="layout/display.xhtml">
            <ui:define name="label">Det precio confirm</ui:define>
            <h:outputText value="#{invDetalleHome.instance.detPrecioConfirm}">
                <f:convertNumber/>
            </h:outputText>
        </s:decorate>

        <s:decorate id="detPrecioSugerid" template="layout/display.xhtml">
            <ui:define name="label">Det precio sugerid</ui:define>
            <h:outputText value="#{invDetalleHome.instance.detPrecioSugerid}">
                <f:convertNumber/>
            </h:outputText>
        </s:decorate>

        <s:decorate id="subdepCodigo" template="layout/display.xhtml">
            <ui:define name="label">Subdep codigo</ui:define>
            <h:outputText value="#{invDetalleHome.instance.subdepCodigo}"/>
        </s:decorate>

        <div style="clear:both"/>

    </rich:panel>

    <div class="actionButtons">

        <s:button view="/InvDetalleEdit.xhtml"
                    id="edit"
                 value="Edit"/>

        <s:button view="/#{empty invDetalleFrom ? 'InvDetalleList' : invDetalleFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>Inv compras</h:panelGroup>
        </f:facet>
    <div class="association" id="invComprasParent">

        <h:outputText value="There is no invCompras associated with this invDetalle."
                   rendered="#{invDetalleHome.instance.invCompras == null}"/>

        <rich:dataTable var="_invCompras"
                   value="#{invDetalleHome.instance.invCompras}"
                rendered="#{invDetalleHome.instance.invCompras != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="invComprasTable">
            <h:column>
                <f:facet name="header">Cmp codigo</f:facet>
                <h:outputText value="#{_invCompras.cmpCodigo}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Cmp fecha</f:facet>
                <h:outputText value="#{_invCompras.cmpFecha}">
                    <s:convertDateTime type="date" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Cmp grabado</f:facet>
                <h:outputText value="#{_invCompras.cmpGrabado}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Dep codigo</f:facet>
                <h:outputText value="#{_invCompras.depCodigo}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Subdepartamento subdep codigo</f:facet>
                <h:outputText value="#{_invCompras.subdepartamento.subdepCodigo}"/>
            </h:column>
            <h:column styleClass="action">
                <f:facet name="header">Action</f:facet>
                <s:link id="viewinvCompras"
                     value="View"
                      view="/InvCompras.xhtml">
                    <f:param name="invComprasCmpCodigo"
                           value="#{_invCompras.cmpCodigo}"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>Inv item stock</h:panelGroup>
        </f:facet>
    <div class="association" id="invItemStockParent">

        <h:outputText value="There is no invItemStock associated with this invDetalle."
                   rendered="#{invDetalleHome.instance.invItemStock == null}"/>

        <rich:dataTable var="_invItemStock"
                   value="#{invDetalleHome.instance.invItemStock}"
                rendered="#{invDetalleHome.instance.invItemStock != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="invItemStockTable">
            <h:column>
                <f:facet name="header">Item secuenca</f:facet>
                <h:outputText value="#{_invItemStock.itemSecuenca}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Dep codigo</f:facet>
                <h:outputText value="#{_invItemStock.depCodigo}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Inv grupo gru codigo</f:facet>
                <h:outputText value="#{_invItemStock.invGrupo.gruCodigo}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Inv unidad medida und codigo</f:facet>
                <h:outputText value="#{_invItemStock.invUnidadMedida.undCodigo}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Ite codigo</f:facet>
                <h:outputText value="#{_invItemStock.iteCodigo}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Ite costo</f:facet>
                <h:outputText value="#{_invItemStock.iteCosto}">
                    <f:convertNumber/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Ite costo dolares</f:facet>
                <h:outputText value="#{_invItemStock.iteCostoDolares}">
                    <f:convertNumber/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Ite costo t</f:facet>
                <h:outputText value="#{_invItemStock.iteCostoT}">
                    <f:convertNumber/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Ite descripcion</f:facet>
                <h:outputText value="#{_invItemStock.iteDescripcion}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Ite nombre</f:facet>
                <h:outputText value="#{_invItemStock.iteNombre}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Ite precio</f:facet>
                <h:outputText value="#{_invItemStock.itePrecio}">
                    <f:convertNumber/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Ite precio dolares</f:facet>
                <h:outputText value="#{_invItemStock.itePrecioDolares}">
                    <f:convertNumber/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Ite unidad</f:facet>
                <h:outputText value="#{_invItemStock.iteUnidad}">
                    <f:convertNumber/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Subdep codigo</f:facet>
                <h:outputText value="#{_invItemStock.subdepCodigo}"/>
            </h:column>
            <h:column styleClass="action">
                <f:facet name="header">Action</f:facet>
                <s:link id="viewinvItemStock"
                     value="View"
                      view="/InvItemStock.xhtml">
                    <f:param name="invItemStockItemSecuenca"
                           value="#{_invItemStock.itemSecuenca}"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
